package kr.hkit.powerjava.chapter22;

public class GenericEx {
	private void main() {
		Box b = new Box();
		b.setData("Hello Java");
		int data = (int) b.getData();
		System.out.println(data);
		
		GenericBox<Integer> gb = new GenericBox<>();
		gb.setData(5);
		System.out.println(gb.getData());
		
		GenericBox<String> gbstr = new GenericBox<>();
		gbstr.setData("Test Generic");
		System.out.println(gbstr.getData());
	}
}


